package com.todo.user.infrastructure.mapper;

import com.todo.user.infrastructure.entity.condition.UserAuthRecordCondition;
import com.todo.user.infrastructure.entity.po.UserAuthRecordPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (UserAuthRecord)表数据库访问层
 *
 * @author zhangwenxiang
 * @since 2024-03-04 00:19:50
 */
@Mapper
public interface UserAuthRecordMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    UserAuthRecordPO queryUserAuthRecordPOById(Long id);

    /**
     * 新增数据
     *
     * @param userAuthRecord 实例对象
     * @return 影响行数
     */
    int insertUserAuthRecordPO(UserAuthRecordPO userAuthRecord);

    /**
     * 批量新增数据
     *
     * @param entities List<UserAuthRecord> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<UserAuthRecordPO> entities);

    /**
     * 修改数据
     *
     * @param userAuthRecord 实例对象
     * @return 影响行数
     */
    int updateUserAuthRecordPOById(UserAuthRecordPO userAuthRecord);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int removeUserAuthRecordPOById(Long id);

    /**
     * 多条件查询用户授权记录列表
     *
     * @param userAuthRecordCondition
     * @return
     */
    List<UserAuthRecordPO> queryUserAuthRecordByCondition(UserAuthRecordCondition userAuthRecordCondition);

    /**
     * 多条件查询用户授权记录数量
     *
     * @param userAuthRecordCondition
     * @return
     */
    Long queryCountByCondition(UserAuthRecordCondition userAuthRecordCondition);
}

